Text int typing for positions to float#2221
Merged
pushfoo merged 2 commits intopythonarcade:developmentfrom Jul 8, 2024
Merged
Text int typing for positions to float#2221pushfoo merged 2 commits intopythonarcade:developmentfrom
Text int typing for positions to float#2221pushfoo merged 2 commits intopythonarcade:developmentfrom
Conversation
Text int typingfor positions to floatText int typing for positions to float
Member
|
@eruvanos was the one changing the typing on these in the past. Should be discussed with him. Moving deeper I would also check with the pyglet people why these were typed as |
pushfoo
approved these changes
Jul 8, 2024
Member
pushfoo
left a comment
There was a problem hiding this comment.
TL;DR: 👍 Do it
This was partly covered in #2183 but that will take forever to merge, so I'll just rebase.
Moving deeper I would also check with the pyglet people why these were typed as
int.
I've been discussing this with them on Discord:
- Mac and Linux seem to allow float font sizes
- Windows does not seem to
- The annotation seems like it should be float even if some renderers round to int
Member
|
Thanks for this fix. The squiggly lines in my editor have been bothering me 🤣 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pyglet types these attributes as
intbut happily acceptsfloat, and we use float for position everywhere else and ¯\(ツ)/¯It was messing up my typing in Charm frankly so I figured other people would run into it